package com.webside.points.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.webside.points.mapper.PostMapper;
import com.webside.points.model.PostEntity;
import com.webside.points.service.PostService;
@Service
public class PostServiceImpl implements PostService{

	@Autowired
	PostMapper postMapper;
	
	@Override
	public List<PostEntity> findAll(PostEntity postEntity) {
		return postMapper.findAll(postEntity);
	}

	@Override
	public PostEntity findById(int postId) {
		return postMapper.findById(postId);
	}

	@Override
	public int insert(PostEntity postEntity) {
		return postMapper.insert(postEntity);
	}

	@Override
	public int delete(int postId) {
		return postMapper.delete(postId);
	}

	@Override
	public int update(PostEntity postEntity) {
		return postMapper.update(postEntity);
	}

	@Override
	public int findCount(PostEntity postEntity) {
		return postMapper.findCount(postEntity);
	}

	@Override
	public int updateStatus(PostEntity postEntity) {
		return postMapper.updateStatus(postEntity);
	}

	@Override
	public List<PostEntity> findAllPost(String title) {
		return postMapper.findAllPost(title);
	}

	@Override
	public int updateBrowseNumber(PostEntity postEntity) {
		return postMapper.updateBrowseNumber(postEntity);
	}

	@Override
	public List<PostEntity> findByPostTypeId(int typeId) {
		return postMapper.findByPostTypeId(typeId);
	}

}
